<? 

$theme_folder="activity";

include "../../../config.php" ;
include_once ROOT_PATH_."/connection.php"; 


$a_id = isset($_REQUEST['id']) ? $_REQUEST['id']  : 0 ;



$activity_info=select_one_line_all_items($table_Prefix."activity","id = '$a_id'");


if(!$activity_info){
  echo "<script type='text/javascript'>alert('参数有误');location.href='index.php';</script>";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Window-target" content="_top" />
    <meta name="revisit-after" content="1 days">
    <?php include_once ROOT_PATH_.'/front/'.$theme_folder.'/modules/head.php'; ?>

<style>

.layui-form-radio span {
    font-size: 22px;
}
</style>
</head>



<body class="gbook_body detail_body">

<div class="nameheader">活动报名</div>



<!--container start-->
<div id="container" class="container">

    <!--main start-->
    <div id="maincontent" class="maincontent">


        <div class="gbook-add-box detail-list-box ">




<div class="add-box gbook-add-content">

<ul>
<form id="detail_form" method="post" action="" autocomplete="off" class="layui-form"  enctype="multipart/form-data" name="uploadfile">

     <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
         <legend><h3><?php echo $activity_info['theme'];?>申请报名</h3></legend>
     </fieldset>

    <input type="hidden" name="ai_activity_id" value="<?php echo $activity_info['id']?>" />
    
    <li>
    	<label>联系人：</label>
        <input type="text" name="ai_name" required lay-verify="required" placeholder="请输入报名人名字" autocomplete="off" value="<?php echo $_REQUEST['ai_name']?>" >
    </li> 

    
    <li>
    	<label>联系电话：</label>
        <input type="text" name="ai_phone"  required lay-verify="required" placeholder="请输入联系电话" autocomplete="off" value="<?php echo $_REQUEST['ai_phone']?>">
    </li> 
    
 
  	 <li>
    	<label>备注说明：</label>
    	<textarea rows="3" cols="" name="ai_remark" placehold=""><?php echo $_REQUEST['ai_remark']?></textarea>
    </li>


<?php session_start();// 必须有此方法才能验证?>

<li class="check_code">
<label>验证码：</label><input type="name" name="code" class="input_imgcode"><img src="/application/verify/z_imgcode.php" onclick='this.src="/application/verify/z_imgcode.php?"+Math.random();' class="img_imgcode">
<div class="clearfloat"></div>
</li>




<?php
if(isset($_REQUEST['code'])){
if($_REQUEST['code'] == strtolower($_SESSION['yzm'])){
echo "
<script type='text/javascript'>
document.getElementById('detail_form').action = '/front/$theme_folder/modules/add-register.php';
document.getElementById('detail_form').submit();
</script>";
}else{
echo '<script type="text/javascript"> alert("请输入正确的验证码！");</script>';
}
}
?>





<!--<li>
    <blockquote class="layui-elem-quote layui-quote-nm content">
        温馨提示<br/>
        1、预约成功后，我们将会在服务时间安排客户专员联系您；<br/>
        2、服务咨询热线：    <br/>
        3、服务时间：周日至周五   上午8:00-12:00， 下午14:00-17:30<br/>
    </blockquote>


</li>
-->
                        <li class="detail-boxing-function">
                            <input type="submit" class="btn_sure"  value="立即报名"  />
                        </li>
                    </form>


<br/>
<!--<br/>-->
<!--<br/>-->
<!--<br/>-->
</ul>

            </div>

        </div>
        <!--main end-->
    </div>
    <!--container end-->

<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  
});
</script>

</body>
</html>
